<?php
//------------------------------------------------------
// page archivage d'une mission
//------------------------------------------------------

// ajout des librairies
include ("../cgi-bin/global.inc.php");
include ("fonctions.php");

	
$date=date("Y-m-d H:i");
$sql = "SELECT missions_etabid,id from data ";
$rsql = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
while($table_liste = mysql_fetch_object($rsql))	
	{
        $sql = "UPDATE data_postetrav set missions_etabid=$table_liste->missions_etabid WHERE dataid=$table_liste->id "; 
	$rsql2 = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
        $sql = "UPDATE actions_correctives set missions_etabid=$table_liste->missions_etabid WHERE dataid=$table_liste->id "; 
	$rsql2 = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
	}
$sql = "SELECT missions_etabid,id from data_a ";
$rsql = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
while($table_liste = mysql_fetch_object($rsql))	
	{
        $sql = "UPDATE data_postetrav_a set missions_etabid=$table_liste->missions_etabid WHERE dataid=$table_liste->id "; 
	$rsql2 = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
        $sql = "UPDATE actions_correctives_a set missions_etabid=$table_liste->missions_etabid WHERE dataid=$table_liste->id "; 
	$rsql2 = mysql_query($sql) or die("Imprimer cette page : <br>erreur sql<br>sql = ".$sql);
	}
?>
